﻿<%@ Page Title="" Language="C#" MasterPageFile="~/System/MasterPage_Base.master"
    AutoEventWireup="true" CodeFile="BannerModify.aspx.cs" Inherits="System_Other_BannerModify" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
    <link href="../Resources/Kindeditor/themes/default/default.css" rel="stylesheet" type="text/css" />
    <script src="../Resources/Kindeditor/kindeditor.js" type="text/javascript"></script>
    <script src="../Resources/Kindeditor/lang/zh_CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        KindEditor.ready(function(K) {
            var editor = K.editor({
                uploadJson: '../Resources/Kindeditor/App/image_upload_json.ashx',
                fileManagerJson: '../Resources/Kindeditor/App/image_manager_json.ashx',
                allowFileManager: true
            });
            K('#btn_Image').click(function() {
                editor.loadPlugin('insertfile', function() {
                    editor.plugin.fileDialog({
                        fileUrl: K('#<%= hd_Image.ClientID %>').val(),
                        clickFn: function(url, title) {
                            K('#<%= hd_Image.ClientID %>').val(url);
                            K('#<%= img_Image.ClientID %>').attr("src", url);
                            editor.hideDialog();
                        }
                    });
                });
            });
        });

    </script>

<style type="text/css">

.td1
{
	height:30px;
	border:solid 1px #333333;
	background-color:#CCCCCC;
}

.td2
{
	height:30px;
	border:solid 1px #333333;
}

</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" Runat="Server">
    新闻编辑
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" Runat="Server">
    <table border="0" style="border-collapse:collapse;">
        <col style="width:100px;" />
        <col style="width:600px;" />
        <tr>
            <td class="td1">标题</td>
            <td class="td2">
                <asp:TextBox ID="txt_Title" runat="server" Text="" Width="400"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="td1">链接</td>
            <td class="td2">
                <asp:TextBox ID="txt_LinkHref" runat="server" Text="" Width="400"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="td1">图片</td>
            <td class="td2">
                <img id="img_Image" runat="server" src="" style="width:380px;height:104px;background-color:Gray;margin:8px;"/>
                <input id="btn_Image" type="button" value="选择图片"/>
                <input id="hd_Image" runat="server" type="hidden" value=""/>
            </td>
        </tr>
        <tr>
            <td class="td1">排序</td>
            <td class="td2">
                <asp:TextBox ID="txt_OrderNo" runat="server" CssClass="TextBox" Width="100" Text="0" ToolTip="只能输入0到99999"></asp:TextBox>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="只能输入0到99999" 
                ControlToValidate="txt_OrderNo" MinimumValue="0" MaximumValue="99999" ValidationGroup="Check"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td class="td1">状态</td>
            <td class="td2">
                <asp:RadioButtonList ID="radio_Valid" runat="server" 
                    RepeatDirection="Horizontal">
                    <asp:ListItem Text="启用" Value="1" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="禁用" Value="0"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:right; padding-right:10px; padding-top:20px;">
                <asp:Button ID="btn_Submit" runat="server" Text="提交" CssClass="Button"  
                    ValidationGroup="Check" onclick="btn_Submit_Click"/>
                <input type="button" value="返回" class="Button" onclick="window.location.href='BannerList.aspx'" />
            </td>
        </tr>
    </table>
</asp:Content>